package com.ytjj.qmyx.admin.eunm;

import lombok.Getter;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description TODO
 * @ClassName SpecialClickEnums
 *
 *
 * @Version 1.0
 **/
@Getter
public enum SpecialClickEnums {

    MALL_COSTUME_COLUMN("MALL_COSTUME_COLUMN", "服饰鞋包"),
    MALL_LIVE_COLUMN("MALL_LIVE_COLUMN","居家生活"),
    MALL_MEIZHUANG_COLUMN("MALL_MEIZHUANG_COLUMN", "美妆护肤"),
    MALL_MOMANDBABY_COLUMN("MALL_MOMANDBABY_COLUMN", "母婴亲子"),
    MALL_JEWELRY_COLUMN("MALL_JEWELRY_COLUMN",	"首饰手表"),
    MALL_HOME_APPLIANCES_COLUMN("MALL_HOME_APPLIANCES_COLUMN","数码家电"),
    MALL_KITCHEN_COLUMN("MALL_KITCHEN_COLUMN",	"厨具卫浴"),
    MALL_FINEFOOD_COLUMN("MALL_FINEFOOD_COLUMN", "美食专区")
    ;

    /**
     * 专区code
     */
    private String specialCode;
    /**
     * 专区名称
     */
    private String specialName;

    SpecialClickEnums(String specialCode, String specialName) {
        this.specialCode = specialCode;
        this.specialName = specialName;
    }

    /**
     * 获取专区名称
     * @param specialCode
     * @return
     */
    public static String getSpecialName(String specialCode) {
        SpecialClickEnums[] values = SpecialClickEnums.values();
        for (SpecialClickEnums value : values) {
            if(value.getSpecialCode().equals(specialCode)) {
                return value.getSpecialName();
            }
        }
        return null;
    }

    /**
     * 获取专区code
     */
    public static List<String> getSpecialCodeList() {
        SpecialClickEnums[] values = SpecialClickEnums.values();
        List<String> specialList = new ArrayList<>();
        for (SpecialClickEnums value : values) {
            specialList.add(value.name());
        }
        return specialList;
    }
}
